<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\Controller;
use think\Route;
//前台登录  路由
Route::get('/','index/Index/index');
//用户登录
Route::get('/login','index/Login/index');
Route::post('/login_s','index/Login/login');
Route::get('/register','index/Login/register');
Route::post('/register_s','index/Login/register_s');
Route::get('/logout','index/login/logout');

//前台  全部作品
Route::get('/article','index/Article/index');

//interface 接口路由
Route::get('/class','index/Inter/class');
Route::get('/artname','index/Inter/article');
Route::get('/class2all','index/Inter/class2all');

//后台登录 路由
Route::get('admin','admin/Index/index');
Route::any('admin/login','admin/Index/login');
Route::get('admin/logout','admin/Index/logout');

//分类管理 资源路由
Route::resource('Category','admin/Category');




return [
    '__pattern__' => [
        'name' => '\w+',
    ],
    '[hello]'     => [
        ':id'   => ['index/hello', ['method' => 'get'], ['id' => '\d+']],
        ':name' => ['index/hello', ['method' => 'post']],
    ],

];
